<?php

class Document{
 protected $id;
 protected $container;

 public function __construct($_id='default',$_container=''){
  $this->id=$_id;
  $this->container=$_container;
 }

 public function __destruct(){
  unset($this->id);
  unset($this->container);  
 }

 public function set_id($_id){$this->id=$_id;}
 public function set_container($_container){
  $this->container=$_container;
 }

 public function get_id(){return $this->id;}
 public function get_container(){return $this->container;}

 public function init($_path){
  $this->id = $_path;
  $this->container = Tool_file::file_load($_path);
 }

 public function __tostring(){
  if(is_object($this->container)){
    return $this->container->__tostring();
  }
  return $this->container;
 }

}

?>
